import request from '../utils/request'

// 获取房屋信息
export const getHouseInfo = id => {
  return request({
    url: `houses/${id}`
  })
}

// 获取房屋的收藏状态
export const getHouseFavorite = id => {
  return request({
    url: `user/favorites/${id}`
  })
}

// 收藏
export const addFavorite = id => {
  return request({
    url: `user/favorites/${id}`,
    method: 'POST'
  })
}

// 取消收藏
export const deleteFavorite = id => {
  return request({
    url: `user/favorites/${id}`,
    method: 'DELETE'
  })
}
